<template>
  <!--<el-button type="warning" plain icon="Download" @click="handleOut">导出</el-button>-->
  <el-table :data="WaitAssessorList" style="width: 90%;border-radius: 8px; margin: 20px auto;box-shadow: 5px 5px 10px rgba(64, 158, 255, 0.5);"
   size="large" 
    :header-cell-style="{
          'background': '#337ecc !important',
          'color': '#ffffff',
          'border': 'none !important'
        }">
    <el-table-column prop="position" label="岗位" width="180" class-name="my-content">
      <template #default="scope">
        <el-popover effect="light" trigger="hover" placement="top" width="auto">
          <template #default>
            <div>备注：{{ scope.row.ins }}</div>
          </template>
          <template #reference>
            {{ scope.row.position }}
          </template>
        </el-popover>
      </template>
    </el-table-column>
    <el-table-column prop="deptName" label="所属单元" width="120" />
    <el-table-column label="操作">
      <template #default="scope">
        <el-button 
        type="success"
         @click="onShowClick(scope.$index, scope.row)"
          >开始审核</el-button
        >
        <!--<el-button
          @click="handleDelete(scope.$index, scope.row)"
          >指定专人审核</el-button
        >-->
      </template>
    </el-table-column>
  </el-table>
</template>


<script setup>
import {ref, onMounted,onBeforeMount, reactive,watch} from "vue";
import { Timer } from '@element-plus/icons-vue';
import {useRouter} from "vue-router";
import {getSecondTask} from '@/api/task'
import { ElMessage } from 'element-plus'

const WaitAssessorList=ref([])
onBeforeMount(()=>{
    let assessorId=JSON.parse(localStorage.getItem('userInfo')).id;
    getSecondTask({assessorId})
    .then(data=>{
        WaitAssessorList.value=data.data;
    });
})

const router = useRouter()
const onShowClick =(index,row) => {
  router.push({
    path: '/OA/secondDetial',
    query: row
  })
}
</script>

<style lang="scss" scoped>
:deep(.my-content) {
  background:#ECF5FF !important;
  font-size: 15px;
}
.pagination {
    margin: 20px 50px;
    display: flex;
    justify-content: end;
}
</style>
